using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.Xml;
using System.Data.Common;
using MacomberMap.Common.User_Interfaces.Components;
using MacomberMap.Common.Types;

namespace MacomberMap.Common.Components
{
    /// <summary>
    /// This class holds information on a transformer winding
    /// </summary>
    [MM_Serializable_Target(MM_Serializable_Target.enumTargetType.Both)]
    public class MM_TransformerWinding : MM_Element
    {
        #region Variable declarations
        /// <summary>
        /// The resource ID of the pricing vector
        /// </summary>
        [Category("Data"), Description("The transformer to which the winding belongs"), MM_Serializable_Target(MM_Serializable_Target.enumTargetType.TypeCollection)]
        public MM_Transformer Transformer
        {
            get { return _Transformer; }
            set { _Transformer = value; }
        }
        private MM_Transformer _Transformer;
        #endregion

        #region Initialization
        /// <summary>
        /// Initialize a new node from a data reader
        /// </summary>
        /// <param name="ElementSource"></param>
        public MM_TransformerWinding(DbDataReader ElementSource)
            : base(ElementSource)
        {
            this.ElemType = MM_Overall_Display.FindElementType("TransformerWinding");

        }

        /// <summary>
        /// Initialize a new node from an XML document
        /// </summary>
        /// <param name="ElementSource"></param>
        public MM_TransformerWinding(XmlElement ElementSource)
            : base(ElementSource)
        {
            this.ElemType = MM_Overall_Display.FindElementType("TransformerWinding");

        }

        /// <summary>
        /// Initialize a parameterless node
        /// </summary>
        public MM_TransformerWinding()
            : base()
        {
            this.ElemType = MM_Overall_Display.FindElementType("TransformerWinding");
        }
        #endregion
    }
}
    
